但是无论出于何种原因,在执行“ Execution”以及DefaultConfig时都会给我一个关键错误
<div id="my-carousel" class="carousel slide" data-ride="carousel" data-interval="7000">
<div class="carousel-inner">
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<?php $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?>
<!-- Adding the below <a> tag causes the issue -->
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><div style="background: url('<?php echo $backgroundImg[0] ?>') no-repeat; background-size:cover;" class="carousel-item <?php if ( $the_query->current_post == 0 ) : ?>active<?php endif; ?>">
<div class="container">
<div class="carousel-caption text-left">
<h1><?php the_title(); ?></h1>
<p class="d-none d-sm-block"><?php echo get_the_excerpt(); ?></p>
</div><!-- END CAPTION -->
</div><!-- END CONTAINER -->
</div><!-- END CAROUSEL ITEM --></a> <!-- End attempt at linking image -->
<?php endwhile; endif; ?>
</div><!-- END CAROUSEL INNER -->
<div class="container-fluid">
<div class="row slider-row carousel slide" data-ride="carousel" data-interval="7000">
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="col-sm-4 feature-box highlight carousel1">
<!-- The <a> tag below stops working -->
<a data-target="#my-carousel" data-slide-to="<?php echo $the_query->current_post; ?>" class="carousel-link <?php if ( $the_query->current_post == 0 ) : ?>active<?php endif; ?>"><?php the_title(); ?></a>
</div><!-- END COL -->
<?php endwhile; endif; ?>
<?php rewind_posts(); ?>
</div><!-- END ROW -->
</div><!-- END CONTAINER -->
</div> <!-- END MY CAROUSEL -->
和代码
Response:
Request ID:
"3ed83472-39af-493b-9df7-7f82d2f14636"
Function Logs:
r: Unexpected key \'Execution\' found in params.InitialVersion.Functions[0].FunctionConfiguration.Environment',
code: 'MultipleValidationErrors',
errors:
[ { UnexpectedParameter: Unexpected key 'DefaultConfig' found in params.InitialVersion
at ParamValidator.fail (/var/runtime/node_modules/aws-
答案 0 :(得分:1)
我认为问题在于配置数据指定了两个互斥的选项。指定了一个内存大小值,并说应该使用“ NoContainer”。当不使用Greengrass容器时,内存大小不是有效的选择。
尝试删除内存大小,看看是否可以解决。
当设置NoContainer来解决此问题时,我在Github上共享的配置代码会“擦洗”功能。清理过程是将内存大小设置为NULL,以便在将其序列化为JSON时缺少该字段。