Comments (5)
Thank you for opening this bug report.
We have identified the issue to be the parallel creation of multiple custom resources each attempting to create the same log stream at once. This results in a ResourceAlreadyExistsException
.
Once the log stream exists, further invocations of the custom resources lambda handler will not try to recreate it, which would explain the success on retry. Since a new log stream is created daily, this problem will resurface on a daily basis.
A fix for this bug will be included in the upcoming release. For now, when using cloudformation templates to manage schedules, you can use the DependsOn
attribute to allow one custom resource to run synchronously prior to the others. This should prevent the race condition.
Example of what that would look like:
Resources:
SampleSchedule1:
Type: 'Custom::ServiceInstanceSchedule'
Properties:
ServiceToken: !Ref ServiceInstanceScheduleServiceTokenARN #do not edit this line
NoStackPrefix: 'False'
Name: my-renamed-sample-schedule
Description: a full sample template for creating cfn schedules showing all possible values
Timezone: America/New_York
Enforced: 'True'
Hibernate: 'True'
RetainRunning: 'True'
StopNewInstances: 'True'
UseMaintenanceWindow: 'True'
SsmMaintenanceWindow: 'my_window_name'
Periods:
- Description: run from 9-5 on the first 3 days of March
BeginTime: '9:00'
EndTime: '17:00'
InstanceType: 't2.micro'
MonthDays: '1-3'
Months: '3'
- Description: run from 2pm-5pm on the weekends
BeginTime: '14:00'
EndTime: '17:00'
InstanceType: 't2.micro'
WeekDays: 'Sat-Sun'
SampleSchedule2:
Type: 'Custom::ServiceInstanceSchedule'
Properties:
ServiceToken: !Ref ServiceInstanceScheduleServiceTokenARN #do not edit this line
NoStackPrefix: 'True'
Description: a sample template for creating simple cfn schedules
Timezone: Europe/Amsterdam
Periods:
- Description: stop at 5pm every day
EndTime: '17:00'
DependsOn: SampleSchedule1
from instance-scheduler-on-aws.
Hi @TranVanDung-Leo, we identified and have a pending fix for this issue. It will be resolved in the next release of Instance Scheduler.
from instance-scheduler-on-aws.
Related Issues (20)
- Support for Israel(Tel Aviv) Region "il-central-1" HOT 3
- Can't start instance without correct KMS permissions HOT 1
- Report Negative Scheduling Patterns HOT 4
- Logger does not show any thing HOT 1
- 'Hibernate' flag doesn't work as documented HOT 2
- Databases of cluster doesn't stop HOT 3
- scheduler-cli Timezone Error HOT 3
- Holiday shutdown HOT 1
- DynamoDB State DB miss reporting correct state of EC2 Instance HOT 5
- Provide a way to specify weekdays after an nth weekday HOT 1
- Skip the stopping of an instance when 'in use' HOT 1
- maximum accounts HOT 1
- ASG support HOT 3
- remote template URL not accessible when used in StackSet HOT 2
- override_status - replacement HOT 4
- Is there a way to have Instance Scheduler support a cron-like syntax to build dynamic schedules in the future HOT 8
- Organisation mode and exclude account HOT 3
- Feature Request - To support multiple one sided starts in a day HOT 1
- Test with Tow accounts in organization mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instance-scheduler-on-aws.